<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>员工浏览</title>
    <link href="/zyy/Public/css/Staff browsing.css" rel="stylesheet" type="text/css">
    <script type="text/javascript"src="/zyy/Public/js/jquery-1.12.1.js"></script>
</head>
<body>
<div class="All">
    <div class="Content">
        <?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="list1 line">
                <div class="image">
                    <img src="/zyy/Public/images/personPhoto.jpg">
                </div>
                <div class="wenzi">
                    <div class="title">
                        <div class="companyname"><?php echo ($vo["emp_name"]); ?></div>
                        <div class="shoutui">棒</div>
                        <div class="eye">
                            <img src="/zyy/Public/images/eye.png">
                            <div class="number">1200</div>
                        </div>
                    </div>
                    <div class="biaozhi">
                        <div class="tuanjie">勤劳</div>
                        <div class="xixin">耐吃苦</div>
                    </div>
                    <div class="gaikuo">
                        <div class="nei rong"><p><?php echo ($vo["emp_com"]); ?></p></div>
                    </div>
                </div>
                <div class="yuyue">
                    <a href="<?php echo U('appointment');?>">
                        <div class="open">雇佣Ta</div>
                    </a>
                </div>
            </div><?php endforeach; endif; else: echo "" ;endif; ?>
    </div>
    <div class="radmenu">
        <a href="#" id="start" class="show">榜单</a>
    </div>
</div>
</body>
</html>
<script>
    document.getElementById("start").onclick = setSelected;

    function setSelected(e) {
        if (this.classList.contains("selected")) {
            this.classList.remove("selected");
            if (!this.parentNode.classList.contains("radmenu")) {
                this.parentNode.parentNode.parentNode.querySelector("a").classList.add("selected")
            } else {
                this.classList.add("show");
            }
        } else {
            this.classList.add("selected");
            if (!this.parentNode.classList.contains("radmenu")) {
                this.parentNode.parentNode.parentNode.querySelector("a").classList.remove("selected")
            } else {
                this.classList.remove("show");
            }
        }
        return false;
    }
    $(function(){
        $(".list1").click(function(){
            var name=$(this).find(".companyname").html();
            var href="<?php echo U('personalProfile',array('name'=>'emp_name'));?>"
            href=href.replace("emp_name",name);
            window.location.href=href;
        });
        $(".radmenu").click(function(){
            window.location.href="<?php echo U('lists');?>";
        });
    });
</script>